﻿@model Tasks.UI.Models.UserPickerModel
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>账户管理</title>
    <link href="@Config.GetCssResourcePath("main.css")" rel="stylesheet" type="text/css" />
    <link href="@Config.GetCssResourcePath("table.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
    
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/global.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/UserPicker.js")" type="text/javascript"></script>

    <script type="text/javascript">
        $(function () {

        })
      
    </script>
</head>
<body>
    @using (Html.BeginForm())
    {
        @Html.HiddenFor(t => t.act)
        <div>
            <div class="searchBar">
             <div class="box">
                <table>
                    <tr>
                        <td>
                            <strong>名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称</strong>
                            @Html.TextBoxFor(t => t.Name) <input type="submit" value="查询" class="btnSearch" />
                        </td>
                    </tr>
                </table>
                <div class="bottom">
                </div>
                 </div>
            </div>
            <ul class="tabsClass">
                <li><a href="/Account/UserPicker?act=personal"  class="@(Model.act == "personal" ? "selected" : "")">
                  <span>个人会员</span>  </a></li>
                <li><a href="/Account/UserPicker?act=enterprise" class="@(Model.act == "enterprise" ? "selected" : "")">
                 <span>企业用户</span>   </a></li>
            </ul>
            @if (Model.act == "personal")
            {
                <table class="tblStyle1" style="table-layout: fixed;">
                    <thead>
                        <tr>
                            <th >
                                名称
                            </th>
                            <th style="width: 120px;">
                                账号
                            </th>
                            <th style="width: 120px;">
                                手机号码
                            </th>
                            <th style="width: 150px;">
                                身份证
                            </th>
                            <th style="width: 80px;">
                                操作
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (PersonalMember personal in Model.PersonalMemberList) {
                        <tr>
                            <td>
                                @personal.Name
                            </td>
                            <td>
                                @personal.AccountNo
                            </td>
                            <td>
                                @personal.MobileNo
                            </td>
                            <td>
                                @personal.IDCard
                            </td>
                            <td>
                                <a href="javascript:void(0)" onclick="parent.selectedUserPicker('@personal.UserID','@personal.Name','@personal.MobileNo','@personal.IDCard')">
                                    选择</a>
                            </td>
                        </tr>
                        }
                    </tbody>
                </table>
            }
            else if (Model.act == "enterprise")
            {
                <table class="tblStyle1" style="table-layout: fixed;">
                    <thead>
                        <tr>
                            <th>
                                名称
                            </th>
                            <th style="width: 120px;">
                                账号
                            </th>
                            <th style="width: 120px;">
                                手机号码
                            </th>
                        
                            <th style="width: 80px;">
                                操作
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (EnterpriseMember enterprise in Model.EnterpriseList) {
                        <tr>
                            <td>
                                @enterprise.Name
                            </td>
                            <td>
                                @enterprise.AccountNo
                            </td>
                            <td>
                                @enterprise.MobileNo
                            </td>
                           
                            <td>
                                <a href="javascript:void(0)" onclick="parent.selectedUserPicker('@enterprise.UserID','@enterprise.Name','@enterprise.MobileNo','')">
                                    选择</a>
                            </td>
                        </tr>
                        }
                    </tbody>
                </table>
            }
            @Html.RenderPageNav(Model.PageIndex, Model.PageSize, Model.RowCount, "", Tasks.Core.PageNavStyle.Form)
        </div>
    }
</body>
</html>
